//
//  AddCityTableViewCell.m
//  WWTQ
//
//  Created by JP on 2018/10/29.
//  Copyright © 2018年 Jqert. All rights reserved.
//

#import "AddCityTableViewCell.h"

@interface AddCityTableViewCell ()
@property (nonatomic, strong) UILabel *addCityName;
@end


@implementation AddCityTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        //        self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.6];
        self.backgroundColor = [UIColor clearColor];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self setUpUI];
    }
    return self;
}

- (void)setUpUI {
    [self.contentView addSubview:self.addCityName];
    
    [self setUpLayoutWithMasonry];
}

- (void)setUpLayoutWithMasonry {
    [self.addCityName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.contentView);
        make.size.mas_equalTo(self.contentView);
    }];
}

- (void)setIsEditer:(BOOL)isEditer {
    if (isEditer) {
        _addCityName.textColor = ZYTBlack3Color;
    } else {
        _addCityName.textColor = ZYTBlack1Color;
    }
}

- (UILabel *)addCityName {
    if (!_addCityName) {
        _addCityName = [[UILabel alloc] init];
        _addCityName.textColor = ZYTBlack1Color;
        _addCityName.font = [UIFont fontWithName:@"STYuanti-SC-Regular" size:22];
        _addCityName.text = @"添加城市 +";
        _addCityName.textAlignment = 1;
    }
    return _addCityName;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
